package com.linkhub.oms.admin.modules.product.domain.param;

import com.linkhub.oms.admin.modules.user.domain.param.BaseUserParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Description: ShopProductQueryParam
 * @Author: echo
 * @Date: 2024/3/20 16:12
 * @Version: 1.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ShopProductQueryParam", description = "ShopProductQueryParam")
public class ShopProductQueryParam extends BaseUserParam implements Serializable {

    @ApiModelProperty(value = "页数, 从1开始")
    @NotNull(message = "{validation.page.notNull}")
    @Range(min = 1, message = "{validation.page.min}")
    private Integer page;

    @ApiModelProperty(value = "每页大小")
    @NotNull(message = "{validation.pageSize.notNull}")
    private Integer size;

    @ApiModelProperty(value = "匹配状态：null-全部；0-未匹配；1-已匹配")
    @Range(min = 0, max = 1, message = "{validation.matchStatus.range}")
    private Integer matchStatus;

    @ApiModelProperty(value = "查询类型：1-商品名称；2-商品sku")
    @Range(min = 1, max = 2, message = "{validation.searchType.range}")
    private Integer searchType;

    @ApiModelProperty(value = "查询关键词")
    private String keyword;
}
